<?php
namespace org;
use think\Request;

class dtcms extends \think\paginator\driver\Bootstrap {
  /**
   * 渲染分页html
   * @return mixed
   */
  public function render() {
    $r = Request::instance()->request();
    $this->appends($r);
    return sprintf(
      '<ul class="pagination">%s %s%s%s%s%s</ul>',
      sprintf('<li><span>显示</span><input type="text" class="pagenum" autocomplete="off" name="size" value="%d" /><span>条/页</span></li>', $this->listRows()),
      sprintf('<li><span>共%d记录</span></li>', $this->total()),
      $this->getPreviousButton('&laquo;上一页'),
      $this->getLinks(),
      $this->getNextButton('下一页&raquo;'),
      sprintf('<li><span>%.4f秒</span></li>', microtime(true) - THINK_START_TIME)
    );
  }
}
